<?xml version="1.0"?>
<!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN"
  "http://colorer.sf.net/2003/hrc.dtd">
<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd">

<type name="bootini">

<region name="group.name" parent="ini:group.name.defined"/>
<region name="param.name" parent="ini:param.name.defined"/>
<region name="param.content" parent="ini:param.content.defined"/>
<region name="option" parent="ini:option.defined"/>


<region name="boot" parent="def:KeywordStrong"/>

<entity name="bs" value="(?{ini:Symbol}(?{def:PairStart}\())"/>
<entity name="es" value="(?{ini:Symbol}(?{def:PairEnd}\)))"/>
<entity name="path" value="(?{def:Path}(?{ini:Symbol}\\)[\w_\~\-`'!@#&amp;\$\^\{\}\(\)\.]*)"/>

<scheme name="boot">
 <regexp match="/[A-Z](\:)%path;+/"
  region="boot" region1="ini:Symbol" 
 />

 <regexp region="boot">
 <![CDATA[/
  multi%bs;(?{ini:Number}\d)%es;
  disk%bs;(?{ini:Number}0)%es;
  \Mrdisk\(
 /x]]></regexp>
 <regexp region="boot">
 <![CDATA[/
  scsi%bs;(?{ini:Number}\d)%es;
  disk%bs;(?{ini:Number}\d+)%es;
  \Mrdisk\(
 /x]]></regexp>
 <regexp region="boot">
 <![CDATA[/
  signature%bs;(?{def:NumberHex}[\s\dA-Fa-f]+)%es;
  disk%bs;(?{ini:Number}\d+)%es;
  \Mrdisk\(
 /x]]></regexp>
 
 <regexp region="boot">
 <![CDATA[/
  (\d\))?#2
  rdisk%bs;(?{ini:Number}[0-3])%es;
  partition%bs;(?{ini:Number}\d)%es;
  %path;
 /x]]></regexp>
 
</scheme>


<scheme name="group">
 <block start="/\M^\[boot loader\]/i" end="/\M^\[[^\]]+\]/" scheme="group-boot"/>  
 <block start="/\M^\[operating systems\]/i" end="/\M^\[[^\]]+\]/" scheme="group-sys"/>  
 <inherit scheme="ini:comment"/>
 <inherit scheme="ini:error"/>
 <!--inherit scheme="ini:group">
  <virtual scheme="ini:group.name" subst-scheme="ini:error"/>
  <virtual scheme="ini:item.content" subst-scheme="ini:error"/>
 </inherit--> 
</scheme>

<scheme name="group.name">
 <inherit scheme="ini:group.name"/>
 <keywords region="group.name" ignorecase="yes">
  <word name="operating systems"/>
  <word name="boot loader"/>
 </keywords>
</scheme>


<!-- boot -->

<scheme name="group-boot">
 <inherit scheme="ini:group">
  <virtual scheme="ini:group.name" subst-scheme="group.name"/>
  <virtual scheme="ini:param" subst-scheme="param-boot"/>
 </inherit> 
</scheme>

<scheme name="param-boot">
 <block start="/\M\s*timeout/i" end="/$/" scheme="param-boot.time"/>
 <block start="/\M\s*default/i" end="/$/" scheme="param-boot.def"/>
 <inherit scheme="ini:param">
  <virtual scheme="ini:param.name" subst-scheme="param-boot.name"/>
  <!--virtual scheme="ini:param.content" subst-scheme="param-boot.content"/-->
 </inherit>
</scheme>

<scheme name="param-boot.name">
 <keywords region="param.name" ignorecase="yes">
  <word name="timeout"/>
  <word name="default"/>
 </keywords> 
</scheme>

<scheme name="param-boot.time">
 <inherit scheme="ini:param">
  <virtual scheme="ini:param.name" subst-scheme="param-boot.name"/>
  <virtual scheme="ini:param.content" subst-scheme="param-boot.content-time"/>
 </inherit>
</scheme>

<scheme name="param-boot.content-time">
 <regexp match="/\b\d+\b/" region="ini:Number"/>
</scheme>

<scheme name="param-boot.def">
 <inherit scheme="ini:param">
  <virtual scheme="ini:param.name" subst-scheme="param-boot.name"/>
  <virtual scheme="ini:param.content" subst-scheme="param-boot.content-def"/>
 </inherit>
</scheme>

<scheme name="param-boot.content-def">
 <inherit scheme="boot"/>
</scheme>


<!-- sys -->

<scheme name="group-sys">
 <inherit scheme="ini:group">
  <virtual scheme="ini:group.name" subst-scheme="group.name"/>
  <virtual scheme="ini:param" subst-scheme="param-sys"/>
 </inherit> 
</scheme>

<scheme name="param-sys">
 <inherit scheme="ini:param">
  <virtual scheme="ini:param.name" subst-scheme="param-sys.name"/>
  <virtual scheme="ini:option.content" subst-scheme="option-sys.content"/>
 </inherit>
</scheme>

<scheme name="param-sys.name">
 <inherit scheme="boot"/>
</scheme>

<scheme name="option-sys.content">
 <keywords region="option" ignorecase="yes">
  <word name="NOGUIBOOT"/>
  <word name="FASTDETECT"/>
  <word name="BOOTLOG"/>
  <!--word name="SAFEBOOT"/-->
  <word name="NOSERIALMICE"/>
  <word name="PERFMEM"/>
  <word name="PERFPAGES"/>
  <word name="INTAFFINITY"/>
  <word name="MAXPROCSPERCLUSTER"/>
  <word name="TIMERES"/>
  <word name="YEAR"/>
  <word name="USE8254"/>
  <word name="MAXMEM"/>
  <word name="BURNMEMORY"/>
  <word name="ONECPU"/>
  <word name="NUMPROC"/>
  <word name="SOS"/>
  <word name="BASEVIDEO"/>
  <word name="NODEBUG"/>
  <word name="CRASHDEBUG"/>
  <word name="DEBUGPORT"/>
  <word name="3GB"/>
  <word name="PCILOCK"/>
 </keywords>
 <regexp match="/\w?#1(\=)(\d+|COM[0-4])/i" 
  region1="ini:Symbol" region2="ini:Number"
 />
 <regexp match="/SAFEBOOT(:)(MINIMAL|NETWORK|DSREPAIR)/i" 
  region="option" region1="ini:Symbol"
 />
</scheme>


<!-- final -->

<scheme name="bootini">
 <!--block start="/\M^\[[^\]]+\]/" end="/\M^\[[^\]]+\]/" scheme="group"/--> 
 <inherit scheme="group"/>
</scheme>

</type>
</hrc>
<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is the Colorer Library.
   -
   - The Initial Developer of the Original Code is
   - Eugene Efremov <4mirror@mail.ru>.
   - Portions created by the Initial Developer are Copyright (C) 2003-2005
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either the GNU General Public License Version 2 or later (the "GPL"), or
   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the LGPL or the GPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->